#!/usr/bin/env python
# -*- coding: utf-8 -*-

from flask import Flask, render_template, request , make_response,session

import file_list

app = Flask(__name__)

# @app.route('/')
# def index():
#     return u"hello world"


#
@app.route('/',methods = ['POST', 'GET'])
def result():
    # if request.method == 'POST':
    result = file_list.generatorMap()
    # print type(result.keys()[0])
    print type(result.keys()[0])

    # result = {1:u"这是中文" , 2:u"我不懂中文", 3: u"chinise" }
    return render_template("table.html", result=result)







if __name__ == '__main__':
    app.secret_key = 'super secret key'
    app.config['SESSION_TYPE'] = 'filesystem'

    app.run(host="127.0.0.1", debug=True)